package com.hd.trans.network.bean;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

/**
 * 用途：网络接口请求参数之一（AI翻译接口等等）
 */
public class UserInfoBean implements Parcelable {
    private String usertoken;//用户token
    private String username;//用户名
    private String headPortrait;//头像url
    private String uid;//用户id

    public UserInfoBean(@NonNull String usertoken, @NonNull String username, String headPortrait, String uid) {
        this.usertoken = usertoken;
        this.username = username;
        this.headPortrait = headPortrait;
        this.uid = uid;
    }

    public String getUsertoken() {
        return usertoken;
    }

    public void setUsertoken(String usertoken) {
        this.usertoken = usertoken;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getHeadPortrait() {
        return headPortrait;
    }

    public void setHeadPortrait(String headPortrait) {
        this.headPortrait = headPortrait;
    }

    @Override
    public String toString() {
        return "UserInfoBean{" +
                "usertoken='" + usertoken + '\'' +
                ", username='" + username + '\'' +
                ", headPortrait='" + headPortrait + '\'' +
                ", uid=" + uid +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.usertoken);
        dest.writeString(this.username);
        dest.writeString(this.headPortrait);
        dest.writeString(this.uid);
    }

    protected UserInfoBean(Parcel in) {
        this.usertoken = in.readString();
        this.username = in.readString();
        this.headPortrait = in.readString();
        this.uid = in.readString();
    }

    public static final Creator<UserInfoBean> CREATOR = new Creator<UserInfoBean>() {
        @Override
        public UserInfoBean createFromParcel(Parcel source) {
            return new UserInfoBean(source);
        }

        @Override
        public UserInfoBean[] newArray(int size) {
            return new UserInfoBean[size];
        }
    };

}
